class RenameColumnForTests < ActiveRecord::Migration
  def self.up
   rename_column :images  , :test_id , :survey_id
   rename_column :norms  , :test_id , :survey_id
   rename_column :norm_infos  , :test_id , :survey_id
   rename_column :orgs_tests  , :test_id , :survey_id
   rename_column :original_results  , :test_id , :survey_id
   rename_column :parts  , :test_id , :survey_id
   rename_column :pre_original_results  , :test_id , :survey_id
   rename_column :pre_test_records  , :test_id , :survey_id
   rename_column :questions  , :test_id , :survey_id
   rename_column :results  , :test_id , :survey_id
   rename_column :survey_count_methods  , :test_id , :survey_id
   rename_column :test_records  , :test_id , :survey_id
   rename_column :trend_scales  , :test_id , :survey_id
   rename_column :users_tests  , :test_id , :survey_id
  end

  def self.down
  rename_column :images  , :survey_id , :test_id
   rename_column :norms  , :survey_id , :test_id
   rename_column :norm_infos  , :survey_id , :test_id
   rename_column :orgs_tests  , :survey_id , :test_id
   rename_column :original_results  , :survey_id , :test_id
   rename_column :parts  , :survey_id , :test_id
   rename_column :pre_original_results  , :survey_id , :test_id
   rename_column :pre_test_records  , :survey_id , :test_id
   rename_column :questions  , :survey_id , :test_id
   rename_column :results  , :survey_id , :test_id
   rename_column :survey_count_methods  , :survey_id , :test_id
   rename_column :test_records  , :survey_id , :test_id
   rename_column :trend_scales  , :survey_id , :test_id
   rename_column :users_tests  , :survey_id , :test_id
  end
end
        
          
          
          
          
          
          
